app.controller("baseController",function($scope){
    $scope.selectedIds=[];
    $scope.updateSelection=function ($event,id) {
        if($event.target.checked){
            //true
            $scope.selectedIds.push(id);
        }else{
            var inIndex=$scope.selectedIds.indexOf(id);
            $scope.selectedIds.splice(inIndex,1);
        }
    }

    $scope.reloadList = function(){
        // 当前第几页    每页多少条
        $scope.search($scope.pageModel.currentPage,$scope.pageModel.itemsPerPage);
    }

    $scope.pageModel = {
        currentPage: 1,
        totalItems: 50,
        itemsPerPage: 10,
        perPageOptions: [5, 10, 15, 40, 50],
        onChange: function(){
            $scope.reloadList();
        }
    }
})